import { compileMdx, MDXRemote } from '@theguild/components/server'

export async function GraphqlConfigInfo({ name, configKey = name }) {
  const rawMdx = `> [!NOTE]
>
> If you have a
> [GraphQL Config configuration file](https://the-guild.dev/graphql/config/docs/user/usage) in your
> project, the GraphQL-ESLint parser will automatically use it to load your GraphQL ${name}.
>
> You should specify a \`${configKey}\` key in the GraphQL Config configuration file to load your
> GraphQL ${name}.
>
> Alternatively, you can pass GraphQL Config options programmatically via
> \`languageOptions.parserOptions.graphQLConfig\` in your \`eslint.config.js\` file.`

const rawJs = await compileMdx(rawMdx)

return <MDXRemote compiledSource={rawJs} /> }
